package com.wumao.mapper;

import com.wumao.pojo.Tag;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author Gaowumao
 * @Decripted
 * @Email none-j@qq.com
 * @create 2021-04-16 15:52
 */
public interface TagMapper extends JpaRepository<Tag,Long> {

    /*通过名称查找Tag*/
    Tag queryByName(String name);

    @Query("select t from Tag t")
    List<Tag> findTop(Pageable pageable);


}
